package io.renren.common.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description:
 * @Author: syh
 * @CreateTime: 2022/5/20 09:47
 */
public class Test {


    public static void main(String[] args) throws Exception {

        String TEMPLATES_PATH = "D:\\专六\\拉取git代码\\vast-finance\\vast_service\\vast_service_backstages\\src\\main\\resources\\static\\";
        String CONTRACT_PATH = "C:\\Users\\LENOVO\\Desktop\\";

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String format = simpleDateFormat.format(new Date());
        // 借款人信息，产品信息，用户信息
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("borrower", "張三冯");
        paramMap.put("lender", "**产品");
        paramMap.put("guarantor", "lisa");
        paramMap.put("create_date", format);
        paramMap.put("real_name", "张三");
        paramMap.put("card_id", "1654654654564654654654");
        paramMap.put("address", "fdsafasdfasdfsd");
        paramMap.put("repayment_date", format);
        paramMap.put("repayment_amount", "132123");
        paramMap.put("interest_rate", "1");
        paramMap.put("Interest", "1");
        ContractDynamicParam param = new ContractDynamicParam(TEMPLATES_PATH, "052012085952.ftl", CONTRACT_PATH, "贷款合同.pdf", paramMap);
        GeneratePdfUtil.GenerateContract(param);
        System.out.println("====test生成PDF合同成功====");
    }
}
